﻿using System;
using System.Collections.Generic;
using System.Security.Principal;
using System.Web.Script.Serialization;
using Newtonsoft.Json;

namespace Edu.Web.Security
{
    /// <summary>
    /// 存放数据的用户实体
    /// </summary>
    public class User
    {
        public long UserId { get; set; }

        public string UserName { get; set; }

        public String RealName { get; set; }

        public int UserType { get; set; }

        public int TeacherType { get; set; }

        // public long? StudentId { get; set; }

        public virtual bool IsInRole(string role)
        {
            return true;
        }

        public virtual bool IsInUser(string user)
        {
            return true;
        }

        [JsonIgnore]
        [ScriptIgnore]
        public IIdentity Identity
        {
            get
            {
                throw new NotImplementedException();
            }
        }
    }
}